FROM adoptopenjdk/openjdk8-openj9:alpine-slim

RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
RUN echo 'Asia/Shanghai' >/etc/timezone

WORKDIR /usr/local/

ENV ACTIVE_PROFILE = "swagger,dev"
ENV SERVER_PORT = 80

COPY ./target/template-api*.jar /usr/local/app.jar
ENTRYPOINT ["java", "-Djava.security.egd=file:/dev/./urandom", "-Dfile.encoding=UTF8", "-jar", "-Dspring.profiles.active=${ACTIVE_PROFILE}", "app.jar"]
